/**
 * 
 */
package com.henryzhou.cloud.action;

import com.henryzhou.cloud.IGetMethod;
import com.henryzhou.cloud.request.GetRequest;
import com.henryzhou.cloud.response.GetResponse;
import com.henryzhou.cloud.response.IResponse;

/**
 * @author haozhou
 *
 */
public class GetAction extends AbstractAction implements IAction, IGetMethod {
	
	public GetAction(String bucket, String uri) {
		super(bucket, uri);
	}

	/**
	 * @see com.henryzhou.cloud.action.IAction#execute()
	 */
	@Override
	public IResponse execute() {
		GetRequest req = (GetRequest) getServiceBuilder().accept(this);
		GetResponse resp = (GetResponse) req.invoke();
		return resp;
	}

	@Override
	public String getHttpMethod() {
		return "GET";
	}

}
